﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Draw_Custom</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
html,body { 
	/* Default Font */
	font-family: 宋体, Arial, Helvetica, sans-serif;
	font-size: 10pt;
}
</style>

</head>

<body>
<P>
<TABLE style="BORDER-COLLAPSE: collapse" border=1 cellSpacing=0 
borderColor=#000000 cellPadding=1 width=800>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>定义</FONT></P></TD>
    <TD width=680><FONT size=2><STRONG><FONT color=#0000ff>C++：</FONT></STRONG><br>void _stdcall Draw_Custom(int x, int y, xge_custom_func bk, void* param, xge::Surface* sf = NULL);<br>void DrawEx_Custom(int x, int y, int cx, int cy, int cw, int ch, xge_custom_func bk, void* param, xge::Surface* sf = NULL);<br><br><STRONG><FONT color=#0000ff>FreeBasic：</FONT></STRONG><br>Sub 
      Draw_Custom(x As Integer, y As Integer, bk As Any Ptr, param As Any Ptr = 
                                    NULL, sf As xge.Surface Ptr = NULL)<br>Sub DrawEx_Custom(x As Integer, y As Integer, cx As Integer, cy As Integer, cw As Integer, ch As Integer, bk As Any Ptr, param As Any Ptr = NULL, sf As xge.Surface Ptr = NULL)<br><br><STRONG><FONT color=#0000ff>SDK_C：</FONT></STRONG><br>暂未公布<br><br><STRONG><FONT color=#0000ff>SDK_BASIC：</FONT></STRONG><br>暂未公布<br><br><STRONG><FONT color=#0000ff>SDK_Pascal：</FONT></STRONG><br>暂未公布<br><br><STRONG><FONT color=#0000ff>SDK_易语言：</FONT></STRONG><br>暂未公布<br><br></FONT></TD></TR>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>功能</FONT></P></TD>
    <TD width=680><FONT size=2><br>将图像渲染到画面或另一幅图像中，使用自定义像素混合算法渲染。<br><br></FONT></TD></TR>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>参数</FONT></P></TD>
    <TD width=680><FONT size=2><br><STRONG><FONT color=#0000ff>x：</FONT></STRONG><br>将图像渲染到目标的横坐标。<br><br><STRONG><FONT color=#0000ff>y：</FONT></STRONG><br>将图像渲染到目标的纵坐标。<br><br><STRONG><FONT color=#0000ff>cx：</FONT></STRONG><br>裁剪图像的起始横坐标。<br><br><STRONG><FONT color=#0000ff>cy：</FONT></STRONG><br>裁剪图像的起始纵坐标。<br><br><STRONG><FONT color=#0000ff>cw：</FONT></STRONG><br>裁剪图像的宽度。<br><br><STRONG><FONT color=#0000ff>ch：</FONT></STRONG><br>裁剪图像的高度。<br><br><STRONG><FONT color=#0000ff>bk：</FONT></STRONG><br>  自定义像素混合算法函数的指针。<br><br><STRONG><FONT color=#0000ff>param：</FONT></STRONG><br>  自定义像素混合算法函数的附加参数。<br><br><STRONG><FONT color=#0000ff>sf：</FONT></STRONG><br>将图像渲染到的目标图像，传递 NULL 则将图像渲染到场景中。<br><br></FONT></TD></TR>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>返回值</FONT></P></TD>
    <TD width=680><FONT size=2><br>无返回值。<br><br></FONT></TD></TR>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>补充说明</FONT></P></TD>
    <TD width=680><FONT size=2><br>像素混合算法可以实现更高级的颜色混合方式，但相比已有算法都经过很多优化，此方式渲染性能较低。<br>自定义像素混合算法渲染相比自定义混合使用更简单，学习成本更低，而后者性能更高，酌情使用。<br><br></FONT></TD></TR>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>使用范例</FONT></P></TD>
    <TD width=680><FONT size=2><br><STRONG><FONT color=#0000ff>C++：</FONT></STRONG><br>参考开发包范例文件夹 8.自定义像素渲染算法。<br><br><STRONG><FONT color=#0000ff>FreeBasic：</FONT></STRONG><br>参考开发包范例文件夹 8.自定义像素渲染算法。</FONT></TD></TR></TABLE></P></body>